import Login from './components/Account/Login.vue'
import refresh from './components/refresh.vue'
import Home from './components/Home.vue'
import index from './components/index.vue'
import menuList from './components/Administrative/system/menu/list.vue'
import menuAdd from './components/Administrative/system/menu/add.vue'
import menuEdit from './components/Administrative/system/menu/edit.vue'
import systemConfig from './components/Administrative/system/config/add.vue'
import ruleList from './components/Administrative/system/rule/list.vue'
import ruleAdd from './components/Administrative/system/rule/add.vue'
import ruleEdit from './components/Administrative/system/rule/edit.vue'
import positionList from './components/Administrative/structures/position/list.vue'
import positionAdd from './components/Administrative/structures/position/add.vue'
import positionEdit from './components/Administrative/structures/position/edit.vue'
import structuresList from './components/Administrative/structures/structures/list.vue'
import structuresAdd from './components/Administrative/structures/structures/add.vue'
import structuresEdit from './components/Administrative/structures/structures/edit.vue'
import groupsList from './components/Administrative/structures/groups/list.vue'
import groupsAdd from './components/Administrative/structures/groups/add.vue'
import groupsEdit from './components/Administrative/structures/groups/edit.vue'
import usersList from './components/Administrative/personnel/users/list.vue'
import usersAdd from './components/Administrative/personnel/users/add.vue'
import usersEdit from './components/Administrative/personnel/users/edit.vue'
import trainList from './components/Administrative/instructor/train/list'

import userList from './components/Administrative/instructor/user/list'
import userload from './components/Administrative/instructor/user/load'
import allApply from './components/Administrative/instructor/declare/list.vue'

import schInfo from './components/Administrative/school/schinfo.vue'
import impUser from './components/Administrative/school/impuser.vue'
import infoChange from './components/Administrative/school/infochange.vue'
import query from './components/Administrative/school/query.vue'
// 已审核（未审核）辅导员信息
import checked from './components/Administrative/school/checked.vue'
import uncheck from './components/Administrative/school/uncheck.vue'
import personchange from './components/Administrative/school/personchange.vue'
import personmsg from './components/Administrative/school/personmsg.vue'

/* 培训 */
import info from './components/Administrative/apply/info.vue'
import sch from './components/Administrative/apply/sch.vue'

// 辅导员项目申报
import proapply from './components/Administrative/project/assistant/declare.vue'
/* 项目 */
import reproject from './components/Administrative/project/reproject/reproject.vue'
import detailpro from './components/Administrative/project/reproject/detailpro.vue'
import mgroup from './components/Administrative/project/reproject/mgroup.vue'
import egroup from './components/Administrative/project/reproject/egroup.vue'
import editgroup from './components/Administrative/project/reproject/editgroup.vue'
import editpro from './components/Administrative/project/reproject/editpro.vue'
import showpro from './components/Administrative/project/reproject/showpro.vue'
import midproject from './components/Administrative/project/midproject/midproject.vue'
import middetailpro from './components/Administrative/project/midproject/middetailpro.vue'
import submidpro from './components/Administrative/project/midproject/submidpro.vue'
import stproject from './components/Administrative/project/stproject/stproject.vue'
import stdetailpro from './components/Administrative/project/stproject/stdetailpro.vue'
import stmgroup from './components/Administrative/project/stproject/stmgroup.vue'
import stegroup from './components/Administrative/project/stproject/stegroup.vue'
import subendpro from './components/Administrative/project/stproject/subendpro.vue'
import editstpro from './components/Administrative/project/stproject/editstpro.vue'
import expertpro from './components/Administrative/project/expertpro/expertpro.vue'
import steditgroup from './components/Administrative/project/stproject/steditgroup.vue'
import expertendpro from './components/Administrative/project/expertpro/expertendpro.vue'

/**
 * meta参数解析
 * hideLeft: 是否隐藏左侧菜单，单页菜单为true
 * module: 菜单所属模块
 * menu: 所属菜单，用于判断三级菜单是否显示高亮，如菜单列表、添加菜单、编辑菜单都是'menu'，用户列表、添加用户、编辑用户都是'user'，如此类推
 */

const routes = [
  { path: '/', component: Login, name: 'Login' },
  {
    path: '/home/index',
    redirect: '/home/index/index'
  },
  {
    path: '/home',
    component: Home,
    children: [
      { path: '/refresh', component: refresh, name: 'refresh' }
    ]
  },
  {
    path: '/home',
    component: Home,
    children: [
      { path: 'index/index', component: index, name: 'index', meta: { hideLeft: false, module: 'Administrative', menu: 'menu' }},
      { path: 'menu/list', component: menuList, name: 'menuList', meta: { hideLeft: false, module: 'Administrative', menu: 'menu' }},
      { path: 'menu/add', component: menuAdd, name: 'menuAdd', meta: { hideLeft: false, module: 'Administrative', menu: 'menu' }},
      { path: 'menu/edit/:id', component: menuEdit, name: 'menuEdit', meta: { hideLeft: false, module: 'Administrative', menu: 'menu' }}
    ]
  },
  {
    path: '/home',
    component: Home,
    children: [
      { path: 'config/add', component: systemConfig, name: 'systemConfig', meta: { hideLeft: false, module: 'Administrative', menu: 'systemConfig' }}
    ]
  },
  {
    path: '/home',
    component: Home,
    children: [
      { path: 'rule/list', component: ruleList, name: 'ruleList', meta: { hideLeft: false, module: 'Administrative', menu: 'rule' }},
      { path: 'rule/add', component: ruleAdd, name: 'ruleAdd', meta: { hideLeft: false, module: 'Administrative', menu: 'rule' }},
      { path: 'rule/edit/:id', component: ruleEdit, name: 'ruleEdit', meta: { hideLeft: false, module: 'Administrative', menu: 'rule' }}
    ]
  },
  {
    path: '/home',
    component: Home,
    children: [
      { path: 'position/list', component: positionList, name: 'positionList', meta: { hideLeft: false, module: 'Administrative', menu: 'position' }},
      { path: 'position/add', component: positionAdd, name: 'positionAdd', meta: { hideLeft: false, module: 'Administrative', menu: 'position' }},
      { path: 'position/edit/:id', component: positionEdit, name: 'positionEdit', meta: { hideLeft: false, module: 'Administrative', menu: 'position' }}
    ]
  },
  {
    path: '/home',
    component: Home,
    children: [
      { path: 'structures/list', component: structuresList, name: 'structuresList', meta: { hideLeft: false, module: 'Administrative', menu: 'structures' }},
      { path: 'structures/add', component: structuresAdd, name: 'structuresAdd', meta: { hideLeft: false, module: 'Administrative', menu: 'structures' }},
      { path: 'structures/edit/:id', component: structuresEdit, name: 'structuresEdit', meta: { hideLeft: false, module: 'Administrative', menu: 'structures' }}
    ]
  },
  {
    path: '/home',
    component: Home,
    children: [
      { path: 'groups/list', component: groupsList, name: 'groupsList', meta: { hideLeft: false, module: 'Administrative', menu: 'groups' }},
      { path: 'groups/add', component: groupsAdd, name: 'groupsAdd', meta: { hideLeft: false, module: 'Administrative', menu: 'groups' }},
      { path: 'groups/edit/:id', component: groupsEdit, name: 'groupsEdit', meta: { hideLeft: false, module: 'Administrative', menu: 'groups' }}
    ]
  },
  {
    path: '/home',
    component: Home,
    children: [
      { path: 'users/list', component: usersList, name: 'usersList', meta: { hideLeft: false, module: 'Administrative', menu: 'users' }},
      { path: 'users/add', component: usersAdd, name: 'usersAdd', meta: { hideLeft: false, module: 'Administrative', menu: 'users' }},
      { path: 'users/edit/:id', component: usersEdit, name: 'usersEdit', meta: { hideLeft: false, module: 'Administrative', menu: 'users' }}
    ]
  },
  {
    path: '/home',
    component: Home,
    children: [
      { path: 'user/list', component: userList, name: 'userList', meta: { hideLeft: false, module: 'Administrative', menu: 'user' }},
      { path: 'user/load', component: userload, name: 'userload', meta: { hideLeft: false, module: 'Administrative', menu: 'user' }},
      { path: 'train/list', component: trainList, name: 'trainList', meta: { hideLeft: false, module: 'Administrative', menu: 'train' }},
      { path: 'declare/list', component: allApply, name: 'allApply', meta: { hideLeft: false, module: 'Administrative', menu: 'allApply' }}
    ]
  },
  /* 高校 */
  {
    path: '/home',
    component: Home,
    children: [
      { path: 'school/list', component: schInfo, name: 'schList', meta: { hideLeft: false, module: 'Administrative', menu: 'school' }},
      { path: 'import/list', component: impUser, name: 'impList', meta: { hideLeft: false, module: 'Administrative', menu: 'school' }},
      // 已（未）审核辅导员、信息变更、查询统计
      { path: 'change/list', component: infoChange, name: 'infoList', meta: { hideLeft: false, module: 'Administrative', menu: 'school' }},
      { path: 'query/list', component: query, name: 'queryList', meta: { hideLeft: false, module: 'Administrative', menu: 'school' }},
      { path: 'check/list', component: checked, name: 'checkedList', meta: { hideLeft: false, module: 'Administrative', menu: 'school' }},
      { path: 'uncheck/list', component: uncheck, name: 'uncheckList', meta: { hideLeft: false, module: 'Administrative', menu: 'school' }},
      { path: 'uncheck/personchange', component: personchange, name: 'personchange', meta: { hideLeft: false, module: 'Administrative', menu: 'school' }},
      { path: 'uncheck/personmsg/:id', component: personmsg, name: 'personmsg', meta: { hideLeft: false, module: 'Administrative', menu: 'school' }}
    ]
  },
  /* 培训 */
  {
    path: '/home',
    component: Home,
    children: [
      { path: 'info/list', component: info, name: 'info', meta: { hideLeft: false, module: 'Administrative', menu: 'info' }},
      { path: 'info/sch/:id', component: sch, name: 'sch', meta: { hideLeft: false, module: 'Administrative', menu: 'sch' }}
    ]
  },
  /* 项目立项 */
  {
    path: '/home',
    component: Home,
    children: [
      // 发布项目
      { path: 'reproject/list', component: reproject, name: 'reproject', meta: { hideLeft: false, module: 'Administrative', menu: 'reproject' }},
      { path: 'reproject/detailpro/:id', component: detailpro, name: 'detailpro', meta: { hideLeft: false, module: 'Administrative', menu: 'detailpro' }},
      { path: 'reproject/mgroup/:id', component: mgroup, name: 'mgroup', meta: { hideLeft: false, module: 'Administrative', menu: 'mgroup' }},
      { path: 'reproject/editgroup/:pro_id&:gro_id&:status', component: editgroup, name: 'editgroup', meta: { hideLeft: false, module: 'Administrative', menu: 'editgroup' }},
      { path: 'reproject/egroup/:id', component: egroup, name: 'egroup', meta: { hideLeft: false, module: 'Administrative', menu: 'egroup' }},
      { path: 'reproject/editpro/:id', component: editpro, name: 'editpro', meta: { hideLeft: false, module: 'Administrative', menu: 'editpro' }},
      { path: 'reproject/showpro/:id', component: showpro, name: 'showpro', meta: { hideLeft: false, module: 'Administrative', menu: 'showpro' }}
    ]
  },
  /* 中期审核 */
  {
    path: '/home',
    component: Home,
    children: [
      { path: 'midcheck/list', component: midproject, name: 'midproject', meta: { hideLeft: false, module: 'Administrative', menu: 'midproject' }},
      { path: 'midcheck/middetailpro/:id', component: middetailpro, name: 'middetailpro', meta: { hideLeft: false, module: 'Administrative', menu: 'middetailpro' }},
      { path: 'midcheck/submidpro/:id', component: submidpro, name: 'submidpro', meta: { hideLeft: false, module: 'Administrative', menu: 'submidpro' }}
    ]
  },
  /* 项目结题 */
  {
    path: '/home',
    component: Home,
    children: [
      { path: 'stproject/list', component: stproject, name: 'stproject', meta: { hideLeft: false, module: 'Administrative', menu: 'stproject' }},
      { path: 'stproject/stdetailpro/:id', component: stdetailpro, name: 'stdetailpro', meta: { hideLeft: false, module: 'Administrative', menu: 'stdetailpro' }},
      { path: 'stproject/subendpro/:id', component: subendpro, name: 'subendpro', meta: { hideLeft: false, module: 'Administrative', menu: 'subendpro' }},
      { path: 'stproject/editstpro/:id', component: editstpro, name: 'editstpro', meta: { hideLeft: false, module: 'Administrative', menu: 'editstpro' }},
      { path: 'stproject/stmgroup/:id', component: stmgroup, name: 'stmgroup', meta: { hideLeft: false, module: 'Administrative', menu: 'stmgroup' }},
      { path: 'stproject/steditgroup/:pro_id&:gro_id&:status', component: steditgroup, name: 'steditgroup', meta: { hideLeft: false, module: 'Administrative', menu: 'steditgroup' }},
      { path: 'stproject/stegroup/:id', component: stegroup, name: 'stegroup', meta: { hideLeft: false, module: 'Administrative', menu: 'stegroup' }}
    ]
  },
  // 辅导员项目申报
  {
    path: '/home',
    component: Home,
    children: [
      { path: 'declare/list/project_id=:id', component: proapply, name: 'proapply', meta: { hideLeft: false, module: 'Administrative', menu: 'proapply' }}
    ]
  },
  // 专家评审
  {
    path: '/home',
    component: Home,
    children: [
      { path: 'prodetail/list', component: expertpro, name: 'expertpro', meta: { hideLeft: false, module: 'Administrative', menu: 'expertpro' }},
      { path: 'end/list', component: expertendpro, name: 'expertendpro', meta: { hideLeft: false, module: 'Administrative', menu: 'expertendpro' }}
    ]
  }
]
export default routes
